package com.wash.shoes.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wash.shoes.domain.dto.RegionTransactionDetailDto;
import com.wash.shoes.domain.dto.ShopStsXcxDto;
import com.wash.shoes.domain.vo.RegionTransactionDetailVo;
import com.wash.shoes.domain.vo.StsOrderVo;
import com.wash.shoes.entity.RegionTransactionDetailPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jianguoli
 * @description 针对表【os_region_transaction_detail(收支明细,订单变为完成的时候入账)】的数据库操作Mapper
 * @createDate 2025-03-11 14:02:41
 * @Entity generator.domain.RegionTransactionDetail
 */
public interface RegionTransactionDetailMapper extends BaseMapper<RegionTransactionDetailPo> {

    /**
     *
     * @param shopStsXcxDto
     * @return 按照每天的推广的收益
     */
    List<StsOrderVo> recommendDayIncome(@Param("shopStsXcxDto") ShopStsXcxDto shopStsXcxDto);

    /**
     *
     * @param shopStsXcxDto
     * @return 统计订单的数据
     */
    StsOrderVo stsOrderInfo(@Param("shopStsXcxDto") ShopStsXcxDto shopStsXcxDto, @Param("status") Integer status, @Param("type") String type);

    /**
     *
     * @param orderId
     * @return
     */
    RegionTransactionDetailPo getByOrderId(@Param("orderId") String orderId);

    /**
     * 获取没有完成的订单
     * @return
     */
    List<RegionTransactionDetailPo> getUniFinishDis();

    /**
     *
     * @param page
     * @param shopStsXcxDto
     * @return 收支列表
     */
    List<RegionTransactionDetailPo> incomeExpenseList(@Param("page") Page<RegionTransactionDetailPo> page, @Param("shopStsXcxDto") ShopStsXcxDto shopStsXcxDto);

    /**
     *
     * @param userId
     * @return
     */
    RegionTransactionDetailPo getUserOutProcess(@Param("userId") String userId);

    /**
     *
     * @param page
     * @param regionTransactionDetailDto
     * @return 查询列表
     */
    List<RegionTransactionDetailVo> pageList(@Param("page") Page<RegionTransactionDetailVo> page, @Param("regionTransactionDetailDto") RegionTransactionDetailDto regionTransactionDetailDto);


    /**
     * 通过用户userId与状态查询体现记录
     *
     * @param userId
     * @return
     */
    List<RegionTransactionDetailPo> queryUserOutProcessByStatusAndUserId(@Param("userId") String userId);
}




